package website

import "os"

const (
	// Agent_prefix  = "Agent."
	// Server_prefix = "RPC_"
	PathSeparator = string(os.PathSeparator)
	// DevNull       = os.DevNull
	// OS_MacOS      = "darwin"
	// OS_FreeBSD    = "freebsd"
	// OS_Linux      = "linux"
	// OS_Windows    = "windows"
	// Arch_AMD64    = "amd64"
	// Arch_386      = "386"
	//ChanLen = 500

	// CONNECT = "CONNECT"
	// DELETE  = "DELETE"
	// GET     = "GET"
	// HEAD    = "HEAD"
	// OPTIONS = "OPTIONS"
	// PATCH   = "PATCH"
	// POST    = "POST"
	// PUT     = "PUT"
	// TRACE   = "TRACE"

	Zip_gZip       = "gzip"
	Zip_Deflate    = "deflate"
	GZip_Mini_Size = 1024
)

// var (
// 	ConfDir  = GetProjectDir() + PathSeparator + "conf"
// 	PidPath  = LogDir + PathSeparator + "pid"
// 	MimePath = ConfDir + PathSeparator + "mime.types"
// 	ConfPath = ConfDir + PathSeparator + "conf.json"
// )

type Config struct {
	RootDir      string
	ConfPath     string
	TemplatePath string
	PidPath      string
	MimePath     string
	LogDir       string `json:"log_dir" xml:"log_dir"`

	Addr           string `json:"addr" xml:"addr"`
	TlsAddr        string `json:"tls_addr" xml:"tls_addr"`
	TlsUrl         string `json:"tls_url" xml:"tls_url"`
	SessionTimeOut int    `json:"session_timeout" xml:"session_timeout"`
	StaticDir      string `json:"static_dir" xml:"static_dir"`
	TemplateDir    string `json:"template_dir" xml:"template_dir"`
	TemplateSuffix string `json:"template_suffix" xml:"template_suffix"`
	EnableTLS      bool   `json:"enable_tls" xml:"enable_tls"`
	EnableFcgi     bool   `json:"enable_fcgi" xml:"enable_fcgi"`
	TlsCert        string `json:"tls_cert,omitempty" xml:"tls_cert,omitempty"`
	TlsKey         string `json:"tls_key,omitempty" xml:"tls_key,omitempty"`
	Daemon         bool   `json:"daemon,omitempty" xml:"daemon,omitempty"`
}
